using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_UIComposite_GridScroll_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.UIComposite.GridScroll);
            args = new Type[]{typeof(huqiang.Data.FakeStruct), typeof(huqiang.Core.HGUI.UIElement), typeof(huqiang.Core.HGUI.UIInitializer)};
            method = type.GetMethod("Initial", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Initial_0);
            args = new Type[]{typeof(System.Boolean)};
            method = type.GetMethod("Order", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Order_1);
            args = new Type[]{typeof(UnityEngine.Vector2)};
            method = type.GetMethod("Refresh", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Refresh_2);
            args = new Type[]{};
            method = type.GetMethod("Refresh", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Refresh_3);
            args = new Type[]{typeof(UnityEngine.Vector2)};
            method = type.GetMethod("DurScroll", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, DurScroll_4);

            field = type.GetField("Column", flag);
            app.RegisterCLRFieldGetter(field, get_Column_0);
            app.RegisterCLRFieldSetter(field, set_Column_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_Column_0, AssignFromStack_Column_0);
            field = type.GetField("Row", flag);
            app.RegisterCLRFieldGetter(field, get_Row_1);
            app.RegisterCLRFieldSetter(field, set_Row_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_Row_1, AssignFromStack_Row_1);
            field = type.GetField("eventCall", flag);
            app.RegisterCLRFieldGetter(field, get_eventCall_2);
            app.RegisterCLRFieldSetter(field, set_eventCall_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_eventCall_2, AssignFromStack_eventCall_2);
            field = type.GetField("Scroll", flag);
            app.RegisterCLRFieldGetter(field, get_Scroll_3);
            app.RegisterCLRFieldSetter(field, set_Scroll_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_Scroll_3, AssignFromStack_Scroll_3);
            field = type.GetField("ScrollEnd", flag);
            app.RegisterCLRFieldGetter(field, get_ScrollEnd_4);
            app.RegisterCLRFieldSetter(field, set_ScrollEnd_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_ScrollEnd_4, AssignFromStack_ScrollEnd_4);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.UIComposite.GridScroll());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.UIComposite.GridScroll[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }


        static StackObject* Initial_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 4);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Core.HGUI.UIInitializer @initializer = (huqiang.Core.HGUI.UIInitializer)typeof(huqiang.Core.HGUI.UIInitializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.Core.HGUI.UIElement @script = (huqiang.Core.HGUI.UIElement)typeof(huqiang.Core.HGUI.UIElement).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            huqiang.Data.FakeStruct @fake = (huqiang.Data.FakeStruct)typeof(huqiang.Data.FakeStruct).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
            huqiang.UIComposite.GridScroll instance_of_this_method = (huqiang.UIComposite.GridScroll)typeof(huqiang.UIComposite.GridScroll).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Initial(@fake, @script, @initializer);

            return __ret;
        }

        static StackObject* Order_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Boolean @force = ptr_of_this_method->Value == 1;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.UIComposite.GridScroll instance_of_this_method = (huqiang.UIComposite.GridScroll)typeof(huqiang.UIComposite.GridScroll).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Order(@force);

            return __ret;
        }

        static StackObject* Refresh_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Vector2 @pos = (UnityEngine.Vector2)typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.UIComposite.GridScroll instance_of_this_method = (huqiang.UIComposite.GridScroll)typeof(huqiang.UIComposite.GridScroll).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Refresh(@pos);

            return __ret;
        }

        static StackObject* Refresh_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.UIComposite.GridScroll instance_of_this_method = (huqiang.UIComposite.GridScroll)typeof(huqiang.UIComposite.GridScroll).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Refresh();

            return __ret;
        }

        static StackObject* DurScroll_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Vector2 @v = (UnityEngine.Vector2)typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.UIComposite.GridScroll instance_of_this_method = (huqiang.UIComposite.GridScroll)typeof(huqiang.UIComposite.GridScroll).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.DurScroll(@v);

            return __ret;
        }


        static object get_Column_0(ref object o)
        {
            return ((huqiang.UIComposite.GridScroll)o).Column;
        }

        static StackObject* CopyToStack_Column_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.GridScroll)o).Column;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Column_0(ref object o, object v)
        {
            ((huqiang.UIComposite.GridScroll)o).Column = (System.Int32)v;
        }

        static StackObject* AssignFromStack_Column_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @Column = ptr_of_this_method->Value;
            ((huqiang.UIComposite.GridScroll)o).Column = @Column;
            return ptr_of_this_method;
        }

        static object get_Row_1(ref object o)
        {
            return ((huqiang.UIComposite.GridScroll)o).Row;
        }

        static StackObject* CopyToStack_Row_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.GridScroll)o).Row;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Row_1(ref object o, object v)
        {
            ((huqiang.UIComposite.GridScroll)o).Row = (System.Int32)v;
        }

        static StackObject* AssignFromStack_Row_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @Row = ptr_of_this_method->Value;
            ((huqiang.UIComposite.GridScroll)o).Row = @Row;
            return ptr_of_this_method;
        }

        static object get_eventCall_2(ref object o)
        {
            return ((huqiang.UIComposite.GridScroll)o).eventCall;
        }

        static StackObject* CopyToStack_eventCall_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.GridScroll)o).eventCall;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_eventCall_2(ref object o, object v)
        {
            ((huqiang.UIComposite.GridScroll)o).eventCall = (huqiang.UIEvent.UserEvent)v;
        }

        static StackObject* AssignFromStack_eventCall_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            huqiang.UIEvent.UserEvent @eventCall = (huqiang.UIEvent.UserEvent)typeof(huqiang.UIEvent.UserEvent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.UIComposite.GridScroll)o).eventCall = @eventCall;
            return ptr_of_this_method;
        }

        static object get_Scroll_3(ref object o)
        {
            return ((huqiang.UIComposite.GridScroll)o).Scroll;
        }

        static StackObject* CopyToStack_Scroll_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.GridScroll)o).Scroll;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Scroll_3(ref object o, object v)
        {
            ((huqiang.UIComposite.GridScroll)o).Scroll = (System.Action<huqiang.UIComposite.GridScroll, UnityEngine.Vector2>)v;
        }

        static StackObject* AssignFromStack_Scroll_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Action<huqiang.UIComposite.GridScroll, UnityEngine.Vector2> @Scroll = (System.Action<huqiang.UIComposite.GridScroll, UnityEngine.Vector2>)typeof(System.Action<huqiang.UIComposite.GridScroll, UnityEngine.Vector2>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
            ((huqiang.UIComposite.GridScroll)o).Scroll = @Scroll;
            return ptr_of_this_method;
        }

        static object get_ScrollEnd_4(ref object o)
        {
            return ((huqiang.UIComposite.GridScroll)o).ScrollEnd;
        }

        static StackObject* CopyToStack_ScrollEnd_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.GridScroll)o).ScrollEnd;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_ScrollEnd_4(ref object o, object v)
        {
            ((huqiang.UIComposite.GridScroll)o).ScrollEnd = (System.Action<huqiang.UIComposite.GridScroll>)v;
        }

        static StackObject* AssignFromStack_ScrollEnd_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Action<huqiang.UIComposite.GridScroll> @ScrollEnd = (System.Action<huqiang.UIComposite.GridScroll>)typeof(System.Action<huqiang.UIComposite.GridScroll>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
            ((huqiang.UIComposite.GridScroll)o).ScrollEnd = @ScrollEnd;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.UIComposite.GridScroll();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
